package com.mycompany.server;

import org.easymock.EasyMock;
import org.easymock.IMocksControl;

/**
 *
 * @author Admin
 */
public class SessionMockHelper {

    public Session getSessionStub(String userName) {
        IMocksControl control = EasyMock.createNiceControl();
        Session sessionStub = control.createMock(Session.class);
        EasyMock.expect(sessionStub.getUserName()).andStubReturn(userName);
        control.replay();
        return sessionStub;
    }
}
